-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disallow the use of TypeType
in complex expressions
#14347
Conversation
878c572
to
98ab864
Compare
...ibsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_invalid_argument_tuple_type.sol
Outdated
Show resolved
Hide resolved
test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_array_of_tuples.sol
Outdated
Show resolved
Hide resolved
76582e6
to
61e3f16
Compare
test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_member_acess.sol
Show resolved
Hide resolved
test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_array_of_tuples.sol
Outdated
Show resolved
Hide resolved
...solidity/syntaxTests/nameAndTypeResolution/584_abi_decode_with_tuple_of_other_than_types.sol
Outdated
Show resolved
Hide resolved
test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_array_of_tuples.sol
Outdated
Show resolved
Hide resolved
test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_member_acess.sol
Show resolved
Hide resolved
730945c
to
5961d51
Compare
test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_array_of_tuples.sol
Outdated
Show resolved
Hide resolved
f3f0f62
to
3705a9a
Compare
@cameel , I added the test cases you suggested. |
3705a9a
to
b909e79
Compare
test/libsolidity/syntaxTests/conversion/implicit_conversion_of_super_in_operators.sol
Show resolved
Hide resolved
Well, something like this obviously won't work when used with abi.decode("", ((true ? addmod : addmod)(1, 2, 3))); I posted these cases here because I thought you were going to include fixes for all the other broken cases in this PR (I specifically asked about this on the chat). Looks like it's not the case, and you'll be splitting it into more PRs - which is perfectly fine, but then you should include these in the PRs that will be fixing them, not here. Only the ones actually relevant to |
Ah, it all makes sense now. I misunderstood when you asked about all the new cases. Now I see what you actually meant. I will remove that test. I guess the |
Yeah. Only the cases with types make sense here. |
2adf01e
to
dc63a8a
Compare
abi.decode
TypeType
in complex expressions
dc63a8a
to
6a06b43
Compare
6a06b43
to
7986006
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor things remaining. Now the test coverage seems adequate.
But we need a changelog entry and a bug list entry. What's the plan here? Will this be done here, done in #14371 or done separately?
test/libsolidity/semanticTests/functionTypes/from_ternary_expression.sol
Outdated
Show resolved
Hide resolved
test/libsolidity/syntaxTests/metaTypes/runtimeCode_from_ternary_with_type_expression.sol
Outdated
Show resolved
Hide resolved
test/libsolidity/syntaxTests/metaTypes/type_expression_nested_type_max_keyword.sol
Outdated
Show resolved
Hide resolved
Done.
I added a changelog entry in 14371 that should cover both PRs. I think the bug list entry could go there too. |
1ec6c06
to
efdaaf0
Compare
f4f5bd8
to
306fd77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now ready, but we should be careful not to merge this before #14371. I usually keep dependent PRs as drafts to avoid that.
efdaaf0
to
e265e9d
Compare
Needs rebase. |
e265e9d
to
0634543
Compare
306fd77
to
02ea52a
Compare
Rebased. |
0634543
to
f3fc190
Compare
02ea52a
to
5b0c1f5
Compare
5b0c1f5
to
4fd5bbf
Compare
Fix #14319.
Depends on #14371.Merged.